package miracle.joker.design.factory_method;

/*
* 具体产品Cat
* */
public class Cat implements Animal{

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Cat() {
    }

    public Cat(String name) {
        this.name = name;
    }

    @Override
    public void makesound() {
        if (getName()!= null && getName() != ""){
            System.out.println(getName()+ ": 喵喵~");
        }else {
            System.out.println("喵喵~");
        }
    }
}
